import { RMIProxyObject } from "../../Engine/RMI/RMIProxyObject";
import { IMailPrx } from "./IMailPrx";
import { AMI_IMail_getMailAttachment } from "./AMI_IMail_getMailAttachment";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { Outgoing } from "../../Engine/RMI/Outgoing";
import { AMI_IMail_getMailAttachmentBatch } from "./AMI_IMail_getMailAttachmentBatch";
import { AMI_IMail_queryMail } from "./AMI_IMail_queryMail";
import { AMI_IMail_readMail } from "./AMI_IMail_readMail";
import { AMI_IMail_removeMail } from "./AMI_IMail_removeMail";
import { SeqLongHelper } from "../Public/SeqLongHelper";
import { AMI_IMail_sendGmReport } from "./AMI_IMail_sendGmReport";
import { AMI_IMail_sendMail } from "./AMI_IMail_sendMail";
import { DictStrIntHelper } from "../Public/DictStrIntHelper";
type int = number;
//class IMailPrxHelper
    
    export  class IMailPrxHelper extends RMIProxyObject implements IMailPrx
    {
        constructor()
        {
            
            super();name = "IMail";
            return;
        }

        public getMailAttachment_async(arg1: AMI_IMail_getMailAttachment, arg2: number, arg3: int, arg4: Boolean): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("getMailAttachment");
            var loc3;
            (loc3 = new SerializeStream()).writeLong(arg2);
            loc3.writeInt(arg3);
            loc3.writeBool(arg4);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public getMailAttachmentBatch_async(arg1: AMI_IMail_getMailAttachmentBatch, arg2: Boolean): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("getMailAttachmentBatch");
            var loc3;
            (loc3 = new SerializeStream()).writeBool(arg2);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public queryMail_async(arg1: AMI_IMail_queryMail, arg2: int, arg3: int, arg4: int, arg5: int, arg6: Boolean): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("queryMail");
            var loc3;
            (loc3 = new SerializeStream()).writeInt(arg2);
            loc3.writeInt(arg3);
            loc3.writeInt(arg4);
            loc3.writeInt(arg5);
            loc3.writeBool(arg6);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public readMail_async(arg1: AMI_IMail_readMail, arg2: number): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("readMail");
            var loc3;
            (loc3 = new SerializeStream()).writeLong(arg2);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public removeMail_async(arg1: AMI_IMail_removeMail, arg2: Array<any>): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("removeMail");
            var loc3=new SerializeStream();
            SeqLongHelper.write(loc3, arg2);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public sendGmReport_async(arg1: AMI_IMail_sendGmReport, arg2: int, arg3: string, arg4: string): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("sendGmReport");
            var loc3;
            (loc3 = new SerializeStream()).writeInt(arg2);
            loc3.writeString(arg3);
            loc3.writeString(arg4);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public sendMail_async(arg1: AMI_IMail_sendMail, arg2: string, arg3: string, arg4: string, arg5: int, arg6: int, arg7: Map<any, any> /* flash.utils.Dictionary */): void
        {
            var loc1=makeContext(session);
            var loc2=makeCall("sendMail");
            var loc3;
            (loc3 = new SerializeStream()).writeString(arg2);
            loc3.writeString(arg3);
            loc3.writeString(arg4);
            loc3.writeInt(arg5);
            loc3.writeInt(arg6);
            DictStrIntHelper.write(loc3, arg7);
            Outgoing.invokeAsync(loc1, loc2, loc3, arg1);
            return;
        }

        public static /* const */NAME: string="Message.Game.IMail";
    }
